{% load thumbnail %}
{% load humanize %}
{% for article in news %}
    <div class="news-list">
      <h4>{{ article.title }}
        <small>By {{ article.user }}, {{ article.publish_date|naturaltime }}</small>
      </h4>
      {% if article.image %}
          {% thumbnail article.image '125x125' format='PNG' upscale=False as image %}
            <a href="{{ article.get_absolute_url }}">
            <img src="{{ image.url }}" class="news-image-preview" />
            </a>
          {% endthumbnail %}
      {% endif %}
      <article>
        {{ article.content|striptags|truncatewords:50 }}<br />
        <a href='{{ article.get_absolute_url }}'>Read more</a>
      </article>
    </div>
{% empty %}
  <p>
  暂时还没有动态，再等等吧。
  </p>
{% endfor %}
